package com.wmh.baseservice.operationaid.controller.store;

import com.wmh.baseservice.operationaid.pojo.vo.store.PddStoreCommitDataReqVO;
import com.wmh.baseservice.operationaid.service.PddStoreDataService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;

import static com.wmh.baseservice.common.utils.returnbody.ReturnBody.success;

/**
 * @author 牛威龙
 * @date 2023/08/04 11:00
 **/
@Validated
@RestController
@RequestMapping("public/store/pdd")
@Api(tags = "店铺数据-拼多多-公开接口(用于机器人请求)")
public class PublicPddStoreController {

    @Resource
    private PddStoreDataService pddStoreDataService;

    @ApiModelProperty(value = "提交店铺数据")
    @PostMapping("commit")
    public String commit(@Valid PddStoreCommitDataReqVO reqVO){
        pddStoreDataService.commit(reqVO);
        return success();
    }
}
